package com.swift.authority.common.exception;

/**
 * @author Administrator
 * @description :
 * @date 2022/06/19 10:12
 * @since open jdk 1.8
 */
public class BusinessException extends Exception{
   private int statusCode;
   private String message;

    public BusinessException() {
    }
    public BusinessException(String message) {
        super(message);
    }
    public BusinessException(int statusCode, String message) {
        this.statusCode = statusCode;
        this.message = message;
    }

    public BusinessException(String message, int statusCode, String message1) {
        super(message);
        this.statusCode = statusCode;
        this.message = message1;
    }

    public BusinessException(String message, Throwable cause, int statusCode, String message1) {
        super(message, cause);
        this.statusCode = statusCode;
        this.message = message1;
    }

    public BusinessException(Throwable cause, int statusCode, String message) {
        super(cause);
        this.statusCode = statusCode;
        this.message = message;
    }

    public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, int statusCode, String message1) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.statusCode = statusCode;
        this.message = message1;
    }


    public int getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(int statusCode) {
        this.statusCode = statusCode;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
